chore(oauth2): Implement Protected Resource protocol#133
Merged
timothedelion merged 3 commits intoMay 18, 2026
Conversation
Member
timothedelion
commented
Apr 14, 2026
- Expose Protected Resource metadata endpoint
- proxy some path to overcome this issue on Claude Web side : Claude.ai ignores authorization_endpoint and token_endpoint from OAuth metadata when MCP server uses external authorization server anthropics/claude-ai-mcp#82
9ba1e2f to
b381f80
Compare
b381f80 to
178ea64
Compare
…to overcome this issue on Claude Web side : anthropics/claude-ai-mcp#82
…odes Both modes now read the bearer token from the request scope via FastMCP's `get_access_token()`. `GitGuardianOAuthThinProxy.verify_token` no longer round-trips to `/api_tokens/self` per request — a new `PassThroughTokenVerifier` trusts the token and lets downstream calls surface 401s. `GitGuardianAuthorizationHeaderMCP` reuses the same verifier so the manual `Authorization` header parser is gone. Issue: APPAI-524
178ea64 to
20bc4ee
Compare
When `TranslateDownstreamUnauthorizedMiddleware` flips a 200 into a 401, the response has no `WWW-Authenticate` header for the advertise middleware to augment, so it synthesizes one. Previously it emitted only `as_metadata` — the Claude.ai-specific shortcut — leaving spec-compliant MCP clients (Cursor, MCP Inspector) without the standard `resource_metadata` discovery pointer required by RFC 9728. `resource_metadata_url_provider` is resolved lazily because FastMCP calls `get_middleware()` before `set_mcp_path()`, so the resource URL is not known at middleware construction time. Issue: APPAI-524
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.